﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace MyEleventhWPFDemo
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            //设置按钮背景色
            //this.button.Background = new SolidColorBrush(Colors.Red);
            //this.button.Background = new SolidColorBrush(Color.FromRgb(255,0,0));

            //设置按钮中字的颜色
            //this.button.Foreground = SystemColors.ControlDarkBrush;

            //设置光标类型
            this.Cursor = Cursors.Wait;

            //显示出所有的字体
            foreach (FontFamily fontFamily in Fonts.SystemFontFamilies)
                this.listBox.Items.Add(fontFamily.Source);
        }
    }
}
